package org.agile2soft.nexoma.tapestry.encoder;

import org.agile2soft.nexoma.core.entities.InternalUser;
import org.hibernate.SessionFactory;

import br.com.arsmachina.controller.Controller;
import br.com.arsmachina.tapestrycrud.hibernate.encoder.HibernateIntegerEncoder;

public class UserEncoder extends HibernateIntegerEncoder<InternalUser> {

    public UserEncoder(SessionFactory sessionFactory,
            Controller<InternalUser, Integer> controller) {
        super(sessionFactory, controller);
    }

    public String toLabel(InternalUser user) {
        return user.getName();
    }

}
